SDK/J Authentication Package ver1.0
RICOH Confidential

jp.co.ricoh.dsdk.scard.option.security
Class DES3SignCredential

java.lang.Object
  extended byjp.co.ricoh.dsdk.scard.option.security.AbstractSignCredential
      extended byjp.co.ricoh.dsdk.scard.option.security.DES3SignCredential
All Implemented Interfaces:
SignCredential

public class DES3SignCredential
extends jp.co.ricoh.dsdk.scard.option.security.AbstractSignCredential

Sample credential to perform a DES-ede signing operation . This credential does not hash a message nor pad input blocks which are too small. It simply performs a single-block DES-ede encryption.


Constructor Summary
DES3SignCredential(byte[] key)
          Uses a 24 bytes array as the key material to generate a DES-ede key and initialize an instance .
DES3SignCredential(java.security.Key des3Key)
          Create an instance with a DES-ede key .
 
Method Summary
 int getInputLength()
          Return the input credential`s length that the cryptographic algorithm can process .
 byte[] sign(byte[] data)
          Sign/encrypt a block of data .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DES3SignCredential

public DES3SignCredential(byte[] key)
Uses a 24 bytes array as the key material to generate a DES-ede key and initialize an instance .

Parameters:
key - the buffer with the DES-ede key material .

DES3SignCredential

public DES3SignCredential(java.security.Key des3Key)
Create an instance with a DES-ede key .

Parameters:
des3Key - a DES-ede key .
Method Detail

getInputLength

public int getInputLength()
Description copied from interface: SignCredential
Return the input credential`s length that the cryptographic algorithm can process .

Returns:
the length of credential .

sign

public byte[] sign(byte[] data)
Description copied from interface: SignCredential
Sign/encrypt a block of data .

Specified by:
sign in interface SignCredential
Parameters:
data - The credential to be signed . Its length must match the length obtained with getInputLength() method.
Returns:
the signature/cryptogram .

SDK/J Authentication Package ver1.0
RICOH Confidential